package cn.tianyigps.tianyigpsapiv2.param.enums;

import lombok.Getter;

@Getter
public enum ResponseEnum {

    SUCCESS(200,true, "操作成功"),
    ERROR(500,false, "服务器异常!"),
    PERMISSION_DENIED(403,true, "没有权限"),
    EID_FAILURE(400,false, "设备号不能为空!"),
    ADD_SUCCESS(200,true, "新增成功"),
    ADD_FAILURE(400, false,"新增失败！请检查参数是否准确！"),
    QUERY_SUCCESS(200,true, "查询成功"),
    QUERY_FAILURE(400, false,"查询失败--请检查参数是否准确！"),
    QUERY_NULL(404, false,"查询--未查询到数据"),
    DELETE_SUCCESS(200,true, "删除成功"),
    DELETE_FAILURE(400,false, "删除--请输入正确删除条件"),
    UPDATE_SUCCESS(200,true, "更新成功"),
    UPDATE_FAILURE(400,false, "更新失败！请检查参数是否准确！");
    private int code;
    private Boolean success;
    private String msg;

    ResponseEnum(int code,Boolean success, String msg) {
        this.code= code;
        this.msg = msg;
        this.success=success;
    }
}